package com.yuyou.tas.service.api.lesson.service;

import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.yuyou.tas.service.api.lesson.dto.MergeStuDTO;
import com.yuyou.tas.service.api.lesson.entity.LessonClassStudent;
import com.yuyou.tas.service.api.lesson.entity.Student;
import com.yuyou.tas.service.api.lesson.req.ReqFilterOrganStuOIds;
import com.yuyou.tas.util.bean.ResBoolSimpleInfo;

@FeignClient(value = "tas-lesson-service")
@RequestMapping(value = "/studentAPI")
public interface StudentAPI {

	@RequestMapping(value = "/selectByPrimaryKey")
	Student selectByPrimaryKey(@RequestParam("id") Long id);
	
	@RequestMapping(value = "/selectByOrgan7OId")
	Student selectByOrgan7OId(@RequestParam("oId") Long oId,@RequestParam("authOrganizationId") Long authOrganizationId);
	
	@RequestMapping(value = "/sycnStudentByOId")
	ResBoolSimpleInfo<String> sycnStudentByOId(@RequestBody List<Student> list)throws Exception;
	
	@RequestMapping(value = "/delByOrgan7OIds")
	ResBoolSimpleInfo<String> delByOrgan7OIds(@RequestParam("oIds") List<Long> oIds,@RequestParam("authOrganizationId") Long authOrganizationId)
			throws Exception;

	@RequestMapping(value = "/sycnStuClass")
	ResBoolSimpleInfo<String> sycnStuClass(@RequestBody List<LessonClassStudent> list)throws Exception;
	
	@RequestMapping(value = "/sycnClassStudentData")
	ResBoolSimpleInfo<String> sycnClassStudentData(@RequestParam("startTime") String startTime);

	@RequestMapping(value = "/selectByOrganIdPhoneName")
	Student selectByOrganIdPhoneName(@RequestParam("authOrganizationId") Long authOrganizationId, @RequestParam("phoneNo") String phoneNo, @RequestParam("name") String name);
	
	/**
	 * 根据Oid过滤学生
	 * @param oId
	 * @return
	 */
	@RequestMapping(value = "/filterOrganByOIds")
	List<Student> filterOrganByOIds(@RequestBody ReqFilterOrganStuOIds reqFilterOrganStuOIds);
	
	/**
	 * 合并学生
	 * @param mergeStuDTO
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/mergeStudent")
	ResBoolSimpleInfo<String> mergeStudent(@RequestBody MergeStuDTO mergeStuDTO) throws Exception;
}
